home *** CD-ROM | disk | FTP | other *** search
- Path: pop.gnn.com!BMette
- From: BMette@gnn.com (Bret)
- Newsgroups: comp.lang.c++
- Subject: record
- Date: Fri, 29 Mar 1996 18:18:01
- Organization: none
- Sender: BMette@gnn.com (none) (from www-12-223.gnn.com. 205.188.12.223)
- Message-ID: <4jhr5v$6dg@news-e2b.gnn.com>
- NNTP-Posting-Host: www-12-223.gnn.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset="us-ascii"
- X-GNN-NewsServer-Posting-Date: 29 Mar 1996 23:19:27 GMT
- X-Mailer: GNNmessenger 1.2
-
- How do I send a 'record' to a file?
- I am using...
-
- struct application {
- char name[24];
- char handle[24];
- char phone[24];
- char address[24];
- char city[24];
- char state[24];
- char country[24];
- char position[24];
- char affils[24];
- char why_left[24];
- char best[24];
- char formats[24];
- char lang[24];} app;
-
- and
-
- handle = open("DOA_APP.TXT", O_CREAT | O_RDWR | O_TEXT);
- write(handle, app.name, 24);
- write(handle, app.handle, 24);
- write(handle, app.phone, 24);
- write(handle, app.address, 24);
- write(handle, app.city, 24);
- write(handle, app.state, 24);
- write(handle, app.country, 24);
- write(handle, app.position, 24);
- write(handle, app.affils, 24);
- write(handle, app.why_left, 24);
- write(handle, app.best, 24);
- write(handle, app.formats, 24);
- write(handle, app.lang, 24);
- close(handle);
-
- but i want to just put it all at once...
- if i cannot put it all at once how do i place line breaks
- after each line?
-
-